home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / rjs.lha / RJS / tests / rload.C < prev    next >
C/C++ Source or Header  |  1991-06-14  |  583b  |  35 lines

  1. #include <iostream.h>
  2. #include <stdio.h>
  3. #include <osfcn.h>
  4. #include <libc.h>
  5.  
  6. #include "RJS/Transport.h"
  7. #include "RJS/NDR.h"
  8. #include "RJS/KernelVar.h"
  9. #include "XKernelVar.h"
  10.  
  11. int main(int argc, char *argv[]) 
  12. {
  13.   if (argc!=3) { cerr << "usage: " << argv[0] << " server port" << endl;exit(1); }
  14.  
  15.   InetStream server;
  16.   InetAddress address(argv[1],atoi(argv[2]));  
  17.  
  18.   Xkern_loadav load;
  19.   NDR_receive ndr;
  20.   char buffer[1024];
  21.  
  22.   ndr.init(buffer,1024);
  23.  
  24.   server.socket_client(address);
  25.  
  26.   server >> ndr;
  27.   ndr >> load;
  28.  
  29.   cout << argv[1] << ":" << load  << endl;
  30.  
  31.   exit(0);
  32.  
  33. }
  34.  
  35.